package com.shop.order.feign;

import com.shop.order.entity.Cart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("shop-manager")
@Repository
public interface ApiItemFeign {

//    @RequestMapping(value = "/item/deductionStock", method = RequestMethod.POST)
//    boolean deductionStock(List<Cart> cartList);

    @RequestMapping(value = "/item/deductionStock", method = RequestMethod.POST)
    boolean deductionStock(@RequestParam("cartListStr") String cartListStr);

}
